import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface BaseApiReq extends BasicModel<BaseApiReq> {
 
}

export interface BadeApiResult extends BasicModel<BadeApiResult> {

}

export const getSectors = (params?: any, data?:any) => {
  return defHttp.postJson<any>({ url: adminPath + '/sector/getSectors', params, data });
}

export const getSectorOfDateRange = (params?: any, data?:any) =>{
  return defHttp.postJson<any>({ url: adminPath + '/sector/getSectorOfDateRange', params, data });
}
export const getSectorByName = (params?: any) => {
  var sectorName = params['sectorName'];
  sectorName = sectorName.replace('/','!');
  return defHttp.get<Recordable>({ url: adminPath+'/sector/getSectorByName?sectorName='+sectorName });
}

